const fs = require("fs");
const path = require("path");

var filePath = path.join(__dirname,"/1.txt");

fs.readFile(filePath,(err,data)=>{//异步方法
    if(err){
        console.log(err);
    }
    else{
        console.log(data);//读出buffer数据
        console.log(data.toString('utf-8'));
    }
});
console.log("同步代码执行");//最先打印
